#!/sbin/openrc-run
# Copyright 2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	 need net
}

start() {
	local bootptab=${bootptab_file:-/etc/bootptab}

	if ! [ -f "${bootptab}" ]; then
		eerror "Unable to find the bootptab file: ${bootptab}"
		eend 1
		return 1
	fi

	ebegin "Starting BOOTP server"
	start-stop-daemon --start --exec /usr/libexec/bootpd -- ${bootpd_opts} ${bootptab}
	eend $?
}

stop() {
	ebegin "Stopping BOOTP server"
	start-stop-daemon --stop --exec /usr/libexec/bootpd
	eend $?
}
